In a computer system, an operating system (hereinafter referred to as “OS”) which is a system management program and system data of a host device, and the like have been stored in a memory device which is an external storage device. Then, at the time of startup of the system, the system is launched by reading the OS from the memory device. The OS, which is software configured to manage the entire computer system, is configured with multiple program file groups.
It should be noted that, at the time of startup of the OS, a special small program referred to as “boot loader” having a function enough for starting another program configured to start the OS is used. A multistage boot loader is often used, invocation of another small program from one small program is repeated, and finally the OS is started. In other words, for the startup of the OS, that is, the startup of the system, many programs with a small capacity are stored in the memory device.
The OS and the boot loader often need to be partially updated for adding functions or correcting defects. Then, if a module in the OS configured with the multiple program file groups, or a boot loader group or the like, is updated, the module can be correctly operated for the first time when all program files have been correctly updated. In other words, if a process of updating the OS or the boot loader fails, the system itself becomes unable to be started, and it has not been easy to fix a problem thereof.
On the other hand, in recent years, a flash memory which is a nonvolatile semiconductor storage medium has been developed, and particularly, a multi-valued recording technique in which a multi-valued bit, instead of a single bit, is stored in one memory cell has been put to practical use, and therefore, a capacity and a density of the flash memory have been progressively increased. Furthermore, recently, a system in which software for startup of the host device, that is, the OS and the boot loader are stored in an embedded memory device has been used.
A NAND-type flash memory uses charges which have been injected into a trap layer consisting of a floating gate or a laminated film, via a tunnel insulating film, as digital bit information depending on an amount of the charges, and reads the digital bit information as 2-valued or multi-valued information. The NAND-type flash memory can read the data without associated data destruction, which is different from a destructive read type memory such as a DRAM.
If the OS and the boot loader group are stored in the memory device having the NAND-type flash memory, the NAND-type flash memory has characteristics of 1) the data is written in units referred to as “pages”, 2) the data is erased in units referred to as “blocks” in which multiple pages have been integrated, and 3) the data cannot be overwritten. Consequently, if the data which is stored in the NAND-type flash memory device is updated with data in small capacity units, a so-called “move” in which a program which does not need to be updated is also rewritten into another block may occur many times. In other words, data which is updated is written in a new block in which data has not yet been written, and furthermore, remaining data which is stored in an old block including old data and is not updated is also written in the new block. The “move” occurring many times means that the program is rewritten many times. Consequently, in some cases, the process of updating the OS or the boot loader group in a conventional NAND-type flash memory device has not been regarded as highly secured.
It should be noted that Japanese Patent Application Laid-Open Publication No. 2007-193596 has disclosed a firmware updating circuit in which, even if a failure such as power discontinuity has occurred at the time of updating firmware, data related to the firmware can be updated onboard without replacing a nonvolatile memory.